package bean;

import javax.persistence.*;
import java.sql.Date;

@Entity
// XE：针对便捷版本的oracle数据库
@Table(name = "PERSONS", schema = "HR", catalog = "XE")
public class Person {
    private Integer personId;
    private String personName;
    private Integer sex;
    private Date birthdate;
    private String address;

    @Id
    @Column(name = "PERSON_ID")
    public Integer getPersonId() {
        return personId;
    }

    public void setPersonId(Integer personId) {
        this.personId = personId;
    }

    @Basic
    @Column(name = "PERSON_NAME")
    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    @Basic
    @Column(name = "SEX")
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "BIRTHDATE")
    public Date getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(Date birthdate) {
        this.birthdate = birthdate;
    }

    @Basic
    @Column(name = "ADDRESS")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
